package com.open.system.dispatch.impl;

import com.open.system.dispatch.IRoleMenuDispatch;
import com.open.common.model.Page;
import com.open.system.model.RoleMenu;
import com.open.system.service.IRoleMenuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * 菜单信息
 *
 * @author 大树03
 * @date 2025-02-16 21:52
 */
@Component(value="roleMenuDispatch")
@Slf4j
public class RoleMenuDispatchImpl implements IRoleMenuDispatch{

	private IRoleMenuService roleMenuService;

    @Autowired
	public void setRoleMenuService(IRoleMenuService roleMenuService) {
		this.roleMenuService = roleMenuService;
	}

	@Override
	public Boolean save(RoleMenu model)  {
		return roleMenuService.save(model);
	}

	@Override
	public Boolean update(RoleMenu model)  {
		return roleMenuService.update(model);
	}

	@Override
	public Page<RoleMenu> findPage(Page<RoleMenu> page,RoleMenu item)  {
		return roleMenuService.findPage(page,item);
	}
	
	@Override
	public List<RoleMenu> findByRoleId(Long pk) {
		return roleMenuService.findByRoleId(pk);
	}

	@Override
    public List<RoleMenu> findByModel(RoleMenu model)  {
		return roleMenuService.findByModel(model);
	}

	@Override
	public Boolean removeByRoleId(List<Long> pks) {
		return roleMenuService.removeByRoleId(pks);
	}
}